//
//  TKIMDataHelper.h
//  TKIM
//
//  Created by liupm on 15/10/13.
//  Copyright © 2015年 liupm. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface TKIMDataHelper : NSObject
/**
 *  @Author lpm, 15-07-30 12:07:10
 *
 *  @brief  字符串转字典
 *
 *  @param string
 */

+(NSObject *)stringToJson:(NSString *)jsonStr;


/**
 *  @Author lpm, 15-07-30 12:07:10
 *
 *  @brief  字典转字符串
 *
 *  @param string
 */

+(NSString *)jsonToString:(NSObject *)obj;



/**
 *  @Author lpm, 15-10-24 21:10:03
 *
 *  @brief  NSdata转换成object
 *
 *  @param data
 *
 *  @return
 */
+(NSObject *)dataToObject:(NSData *)data;


/**
 *  @Author lpm, 15-11-03 17:11:15
 *
 *  @brief  转换相册 视频为data
 *
 *  @param assetUrl
 *  @param complete
 */
+(void)assetUrlToData:(NSURL *)assetUrl complete:(void(^)(NSData *data,NSError *error))complete;


/**
 *  @Author lpm, 15-11-05 17:11:47
 *
 *  @brief  对象转nsdata
 *
 *  @param obj
 *
 *  @return
 */
+(NSData *)objectToData:(NSObject *)obj;


/**
 *  @Author lpm, 16-04-05 14:04:40
 *
 *  @brief  16进制字符串转换成字符数组
 *
 *  @param hexString 16进制字符串
 *
 *  @return 字符数组
 */
+(char *)charFromHexString:(NSString *)hexString;


/**
 *  @Author lpm, 16-04-05 14:04:31
 *
 *  @brief  NSString* 转 char *
 *
 *  @param string
 *
 *  @return
 */
+(const char *)stringToChars:(NSString *)string;


/**
 *  char* 转 NSString*
 *
 *  @param chars char*
 *
 *  @return NSString
 */
+(NSString *)charsToString:(char *)chars;

@end
